﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HaskellPlugin {
	public class Plugin : IPlugin {
		public string Name { 
			get { return "HaskellPlugin"; } 
		}

		public string languageName { 
			get { return "Haskell"; } 
		}

		public string Extension { 
			get { return "hs"; } 
		}

		public string CSSPath { 
			get { return ""; } 
			set { } 
		}

		string CompleteToDocument(string bodyText) {
			string head = @"<head><link rel=""stylesheet"" href=""default.css"" type=""text/css"" /></head>";
			return head + "<body><pre>" + bodyText + @"</pre></body>";
		}

		public string HightLightCode(string input) {
			return Formatter.ToHTML(Lexer.Tokens(input += '\n'));
		}

		public string SourcetoHtml(string input) {
			return CompleteToDocument(HightLightCode(input));
		}
	}
}
